package Snow;
import java.util.Random;
import javax.swing.*;

public class Snow extends JLabel {
    private int speed;
    private int direction;
    public Snow(){

    }
    public Snow(Icon image){
        super(image);
    }
    public Snow(int speed, int direction, Icon image){
        super(image);
        this.speed=speed;
        this.direction=direction;
    }

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    public int getDirection() {
        return direction;
    }

    public void setDirection(int direction) {
        this.direction = direction;
    }

    public void slowDown(){
        this.setLocation(this.getLocation().x+this.direction,this.getLocation().y+this.speed);
        if(this.getLocation().y>400)this.setLocation(new Random().nextInt(500),0);
    }
}
